<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>用户添加</title>
    <meta content="webkit" name="renderer">
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
    <link media="all" rel="stylesheet" th:href="@{/libs/layui-v2.5.5/css/layui.css}">
    <style>
        body {
            background-color: #F2F2F2;
        }
    </style>
</head>
<body>
<div style="padding: 30px;">
    <div class="layui-row layui-col-space20">
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header">CPU信息</div>
                <div class="layui-card-body">
                    <!--/*@thymesVar id="cpu" type="com.attendance.monitoring.server.Cpu"*/-->
                    <table class="layui-table" lay-skin="nob">
                        <thead>
                        <tr>
                            <th>属性</th>
                            <th>值</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>核心数</td>
                            <td th:text="${server.getCpu().getCpuNum()}"></td>
                        </tr>
                        <tr>
                            <td>用户使用率</td>
                            <td th:text="${server.getCpu().getUsed() + '%'}"></td>
                        </tr>
                        <tr>
                            <td>系统使用率</td>
                            <td th:text="${server.getCpu().getSys()  + '%'}"></td>
                        </tr>
                        <!--                        <tr>-->
                        <!--                            <td>当前等待率</td>-->
                        <!--                            <td th:text="${server.getCpu().getWait()  + '%'}"></td>-->
                        <!--                        </tr>-->
                        <tr>
                            <td>当前空闲率</td>
                            <td th:text="${server.getCpu().getFree()  + '%'}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header">内存信息</div>
                <div class="layui-card-body">
                    <table class="layui-table" lay-skin="nob">
                        <thead>
                        <tr>
                            <th>属性</th>
                            <th>内存</th>
                            <th>JVM</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>总内存</td>
                            <td th:text="${server.getMem().getTotal()+'G'}"></td>
                            <td th:text="${server.getJvm().getTotal()+'M'}"></td>
                        </tr>
                        <tr>
                            <td>已用内存</td>
                            <td th:text="${server.getMem().getUsed() + 'G'}"></td>
                            <td th:text="${server.getJvm().getUsed() + 'M'}"></td>
                        </tr>
                        <tr>
                            <td>剩余内存</td>
                            <td th:text="${server.getMem().getFree()  + 'G'}"></td>
                            <td th:text="${server.getJvm().getFree()  + 'M'}"></td>
                        </tr>
                        <tr>
                            <td>使用率</td>
                            <td th:text="${server.getMem().getUsage()  + '%'}"></td>
                            <td th:text="${server.getJvm().getUsage()  + '%'}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row layui-col-space20">
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header">服务器信息</div>
                <div class="layui-card-body">
                    <!--/*@thymesVar id="cpu" type="com.attendance.monitoring.server.Cpu"*/-->
                    <table class="layui-table" lay-skin="nob">
                        <tbody>
                        <tr>
                            <td>服务器名称</td>
                            <td th:text="${server.getSys().getComputerName()}"></td>
                        </tr>
                        <tr>
                            <td>服务器IP</td>
                            <td th:text="${server.getSys().getComputerIp()}"></td>
                        </tr>
                        <tr>
                            <td>操作系统</td>
                            <td th:text="${server.getSys().getOsName()}"></td>
                        </tr>
                        <tr>
                            <td>系统架构</td>
                            <td th:text="${server.getSys().getOsArch()}"></td>
                        </tr>
                        <tr>
                            <td>项目路径</td>
                            <td th:text="${server.getSys().getUserDir()}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-card">
                <div class="layui-card-header">虚拟机信息</div>
                <div class="layui-card-body">
                    <table class="layui-table" lay-skin="nob">
                        <tbody>
                        <tr>
                            <td>Java名称</td>
                            <td th:text="${server.getJvm().getName()}"></td>
                        </tr>
                        <tr>
                            <td>java版本</td>
                            <td th:text="${server.getJvm().getVersion()}"></td>
                        </tr>
                        <tr>
                            <td>启动时间</td>
                            <td th:text="${server.getJvm().getStartTime()}"></td>
                        </tr>
                        <tr>
                            <td>运行时长</td>
                            <td th:text="${server.getJvm().getRunTime()}"></td>
                        </tr>
                        <tr>
                            <td>安装路径</td>
                            <td th:text="${server.getJvm().getHome()}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row layui-col-space20" style="padding: 10px;margin-top: 10px">
        <div class="layui-card">
            <div class="layui-card-header">磁盘状态</div>
            <div class="layui-card-body">
                <table class="layui-table" lay-skin="nob">
                    <thead>
                    <tr>
                        <td>盘符路径</td>
                        <td>文件系统</td>
                        <td>盘符类型</td>
                        <td>总存储空间</td>
                        <td>可用空间</td>
                        <td>已用空间</td>
                        <td>已用占比</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                    <tr th:each="sysFile : ${server.sysFiles}">
                        <td th:text="${sysFile.dirName}">C:\</td>
                        <td th:text="${sysFile.sysTypeName}"></td>
                        <td th:text="${sysFile.typeName}"></td>
                        <td th:text="${sysFile.total}"></td>
                        <td th:text="${sysFile.free}"></td>
                        <td th:text="${sysFile.used}"></td>
                        <td th:text="${sysFile.usage+'%'}"></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<script charset="utf-8" th:src="@{/libs/layui-v2.5.5/layui.js}"></script>

<script>
</script>
</body>
</html>